﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IndyMosaic.Models.Web
{
    public class MediaRepository : IMediaRepository
    {
        WebDataContext context = new WebDataContext();

        public bool ShowingLiveStream()
        {
            var siteContent = context.SiteContents.First();
            return siteContent.ShowLiveStream;
        }

        public bool ShowLiveStream(bool showStream)
        {
            var siteContent = context.SiteContents.First();
            siteContent.ShowLiveStream = showStream;
            
            context.SubmitChanges();
            return siteContent.ShowLiveStream;
        }
    }
}
